/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lcfgly.Database;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author lcfgly
 */
@Entity
@Table(name = "shop_onepage")
@NamedQueries({
    @NamedQuery(name = "ShopOnepage.findAll", query = "SELECT s FROM ShopOnepage s")})
public class ShopOnepage implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "tid")
    private Integer tid;
    @Basic(optional = false)
    @Column(name = "title")
    private String title;
    @Lob
    @Column(name = "body")
    private String body;
    @Basic(optional = false)
    @Column(name = "writer")
    private String writer;
    @Basic(optional = false)
    @Column(name = "writeruid")
    private int writeruid;
    @Basic(optional = false)
    @Column(name = "updatetime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatetime;

    public ShopOnepage() {
    }

    public ShopOnepage(Integer tid) {
        this.tid = tid;
    }

    public ShopOnepage(Integer tid, String title, String writer, int writeruid, Date updatetime) {
        this.tid = tid;
        this.title = title;
        this.writer = writer;
        this.writeruid = writeruid;
        this.updatetime = updatetime;
    }

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getWriter() {
        return writer;
    }

    public void setWriter(String writer) {
        this.writer = writer;
    }

    public int getWriteruid() {
        return writeruid;
    }

    public void setWriteruid(int writeruid) {
        this.writeruid = writeruid;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tid != null ? tid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ShopOnepage)) {
            return false;
        }
        ShopOnepage other = (ShopOnepage) object;
        if ((this.tid == null && other.tid != null) || (this.tid != null && !this.tid.equals(other.tid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.lcfgly.Database.ShopOnepage[ tid=" + tid + " ]";
    }
    
}
